// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#pragma once

// These codes are defined in:
// "Universal Serial Bus HID Usage Tables"
// http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
// (Version 1.12, 10/28/2004)
// See "Table 12: Keyboard/Keypad Page"

enum {
    HID_USAGE_KEY_ERROR_ROLLOVER = 0x01,
    HID_USAGE_KEY_POST_FAIL = 0x02,
    HID_USAGE_KEY_ERROR_UNDEF = 0x03,
    HID_USAGE_KEY_A = 0x04,
    HID_USAGE_KEY_B = 0x05,
    HID_USAGE_KEY_C = 0x06,
    HID_USAGE_KEY_D = 0x07,
    HID_USAGE_KEY_E = 0x08,
    HID_USAGE_KEY_F = 0x09,
    HID_USAGE_KEY_G = 0x0a,
    HID_USAGE_KEY_H = 0x0b,
    HID_USAGE_KEY_I = 0x0c,
    HID_USAGE_KEY_J = 0x0d,
    HID_USAGE_KEY_K = 0x0e,
    HID_USAGE_KEY_L = 0x0f,
    HID_USAGE_KEY_M = 0x10,
    HID_USAGE_KEY_N = 0x11,
    HID_USAGE_KEY_O = 0x12,
    HID_USAGE_KEY_P = 0x13,
    HID_USAGE_KEY_Q = 0x14,
    HID_USAGE_KEY_R = 0x15,
    HID_USAGE_KEY_S = 0x16,
    HID_USAGE_KEY_T = 0x17,
    HID_USAGE_KEY_U = 0x18,
    HID_USAGE_KEY_V = 0x19,
    HID_USAGE_KEY_W = 0x1a,
    HID_USAGE_KEY_X = 0x1b,
    HID_USAGE_KEY_Y = 0x1c,
    HID_USAGE_KEY_Z = 0x1d,
    HID_USAGE_KEY_1 = 0x1e,
    HID_USAGE_KEY_2 = 0x1f,
    HID_USAGE_KEY_3 = 0x20,
    HID_USAGE_KEY_4 = 0x21,
    HID_USAGE_KEY_5 = 0x22,
    HID_USAGE_KEY_6 = 0x23,
    HID_USAGE_KEY_7 = 0x24,
    HID_USAGE_KEY_8 = 0x25,
    HID_USAGE_KEY_9 = 0x26,
    HID_USAGE_KEY_0 = 0x27,
    HID_USAGE_KEY_ENTER = 0x28,
    HID_USAGE_KEY_ESC = 0x29,
    HID_USAGE_KEY_BACKSPACE = 0x2a,
    HID_USAGE_KEY_TAB = 0x2b,
    HID_USAGE_KEY_SPACE = 0x2c,
    HID_USAGE_KEY_MINUS = 0x2d,
    HID_USAGE_KEY_EQUAL = 0x2e,
    HID_USAGE_KEY_LEFTBRACE = 0x2f,
    HID_USAGE_KEY_RIGHTBRACE = 0x30,
    HID_USAGE_KEY_BACKSLASH = 0x31,
    HID_USAGE_KEY_NON_US_OCTOTHORPE = 0x32,
    HID_USAGE_KEY_SEMICOLON = 0x33,
    HID_USAGE_KEY_APOSTROPHE = 0x34,
    HID_USAGE_KEY_GRAVE = 0x35,
    HID_USAGE_KEY_COMMA = 0x36,
    HID_USAGE_KEY_DOT = 0x37,
    HID_USAGE_KEY_SLASH = 0x38,
    HID_USAGE_KEY_CAPSLOCK = 0x39,
    HID_USAGE_KEY_F1 = 0x3a,
    HID_USAGE_KEY_F2 = 0x3b,
    HID_USAGE_KEY_F3 = 0x3c,
    HID_USAGE_KEY_F4 = 0x3d,
    HID_USAGE_KEY_F5 = 0x3e,
    HID_USAGE_KEY_F6 = 0x3f,
    HID_USAGE_KEY_F7 = 0x40,
    HID_USAGE_KEY_F8 = 0x41,
    HID_USAGE_KEY_F9 = 0x42,
    HID_USAGE_KEY_F10 = 0x43,
    HID_USAGE_KEY_F11 = 0x44,
    HID_USAGE_KEY_F12 = 0x45,
    HID_USAGE_KEY_PRINTSCREEN = 0x46,
    HID_USAGE_KEY_SCROLLLOCK = 0x47,
    HID_USAGE_KEY_PAUSE = 0x48,
    HID_USAGE_KEY_INSERT = 0x49,
    HID_USAGE_KEY_HOME = 0x4a,
    HID_USAGE_KEY_PAGEUP = 0x4b,
    HID_USAGE_KEY_DELETE = 0x4c,
    HID_USAGE_KEY_END = 0x4d,
    HID_USAGE_KEY_PAGEDOWN = 0x4e,
    HID_USAGE_KEY_RIGHT = 0x4f,
    HID_USAGE_KEY_LEFT = 0x50,
    HID_USAGE_KEY_DOWN = 0x51,
    HID_USAGE_KEY_UP = 0x52,
    HID_USAGE_KEY_NUMLOCK = 0x53,
    HID_USAGE_KEY_KP_SLASH = 0x54,
    HID_USAGE_KEY_KP_ASTERISK = 0x55,
    HID_USAGE_KEY_KP_MINUS = 0x56,
    HID_USAGE_KEY_KP_PLUS = 0x57,
    HID_USAGE_KEY_KP_ENTER = 0x58,
    HID_USAGE_KEY_KP_1 = 0x59,
    HID_USAGE_KEY_KP_2 = 0x5a,
    HID_USAGE_KEY_KP_3 = 0x5b,
    HID_USAGE_KEY_KP_4 = 0x5c,
    HID_USAGE_KEY_KP_5 = 0x5d,
    HID_USAGE_KEY_KP_6 = 0x5e,
    HID_USAGE_KEY_KP_7 = 0x5f,
    HID_USAGE_KEY_KP_8 = 0x60,
    HID_USAGE_KEY_KP_9 = 0x61,
    HID_USAGE_KEY_KP_0 = 0x62,
    HID_USAGE_KEY_KP_DOT = 0x63,
    HID_USAGE_KEY_NON_US_BACKSLASH = 0x64,

    // TODO: other keys

    HID_USAGE_KEY_LEFT_CTRL = 0xe0,
    HID_USAGE_KEY_LEFT_SHIFT = 0xe1,
    HID_USAGE_KEY_LEFT_ALT = 0xe2,
    HID_USAGE_KEY_LEFT_GUI = 0xe3,
    HID_USAGE_KEY_RIGHT_CTRL = 0xe4,
    HID_USAGE_KEY_RIGHT_SHIFT = 0xe5,
    HID_USAGE_KEY_RIGHT_ALT = 0xe6,
    HID_USAGE_KEY_RIGHT_GUI = 0xe7,
    HID_USAGE_KEY_VOL_DOWN = 0xe8,
    HID_USAGE_KEY_VOL_UP = 0xe9,
};
